package com.desksoft.dao;

import javax.inject.Inject;

import com.desksoft.common.BaseDao;
import com.desksoft.entity.User;
import com.desksoft.entity.mapper.UserMapper;

/**
 * 用户DAO
 * @author forever
 *
 */
public class UserDao extends BaseDao {

	@Inject
	private UserMapper userMapper ;
	
	public void registerUser(User u ){
		userMapper.insertUser(u);
	}

	/**
	 * 用户登陆
	 * @param u
	 */
	public User loginUser(User u) {
		return userMapper.loginUser(u);
	}
	
	/**
	 * 用户是否存在
	 * @param u
	 * @return
	 */
	public Integer isExistUser(User u){
		return userMapper.isExistUser(u);
	}
}
